<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<% 
String menuId = request.getParameter("menuId");
if(menuId == null){
	menuId = "0";
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/backstyle/css/index.css" type="text/css"></link>
		<script type="text/javascript" src="${pageContext.request.contextPath}/backstyle/js/jquery-1.8.0.js"></script>
	</head>
	<body>
		<!--第一个二级菜单-->
		<div>
			<div id="anniu">
				<div class="anniu-z_01"></div>
				<div class="anniu-z_02" onclick="navmain('1')">用户信息</div>
				<div class="anniu-z_04"></div>
			</div>
			<div class="MM" id="newmenu1" style='display:none;'>
				<ul>
					<li id='childmenu11'  menuno="11"><a href="userManagerList.jsp"  target="mainFrame" onclick="chgcss(this)">用户列表</a></li>
					<li id='childmenu12'  menuno="12"><a href="#"  target="mainFrame" onclick="chgcss(this)">添加用户</a></li>
					<li id='childmenu13'  menuno="13"><a href="#"  target="mainFrame" onclick="chgcss(this)">修改用户</a></li>
					<li id='childmenu14'  menuno="14"><a href="#"  target="mainFrame" onclick="chgcss(this)">密码管理</a></li>
				</ul>
			</div>
		</div>
		
		<!--第二个二级菜单-->
		<div>
			<div id="anniu">
				<div class="anniu-z_01"></div>
				<div class="anniu-z_02" onclick="navmain('2')">前台模块</div>
				<div class="anniu-z_04"></div>
			</div>
			<div class="MM" id="newmenu2" style='display:none;'>
				<ul>
					<li id='childmenu21'  menuno="21"><a href="#"  target="mainFrame" onclick="chgcss(this)">模块列表</a></li>
					<li id='childmenu22'  menuno="22"><a href="#"  target="mainFrame" onclick="chgcss(this)">初始化数据查询</a></li>
					<li id='childmenu23'  menuno="23"><a href="#"  target="mainFrame" onclick="chgcss(this)">位置设定</a></li>
				</ul>
			</div>
		</div>
		
		<!--第三个二级菜单-->
		<div>
			<div id="anniu">
				<div class="anniu-z_01"></div>
				<div class="anniu-z_02" onclick="navmain('3')">客户信息</div>
				<div class="anniu-z_04"></div>
			</div>
			<div class="MM" id="newmenu3" style='display: none;'>
				<ul>
					<li id='childmenu31'  menuno="31"><a href="logincomfirm.jsp"  target="mainFrame" onclick="chgcss(this)">邮件订阅</a></li>
					<li id='childmenu32'  menuno="32"><a href="#"  target="mainFrame" onclick="chgcss(this)">留言板</a></li>
					<li id='childmenu33'  menuno="33"><a href="#"  target="mainFrame" onclick="chgcss(this)">视频管理</a></li>
					<li id='childmenu34'  menuno="34"><a href="#"  target="mainFrame" onclick="chgcss(this)">图片管理</a></li>
				</ul>
			</div>
		</div>
		
		<!--第四个二级菜单-->
		<div>
			<div id="anniu">
				<div class="anniu-z_01"></div>
				<div class="anniu-z_02" onclick="navmain('4')">文章管理</div>
				<div class="anniu-z_04"></div>
			</div>
			<div class="MM" id="newmenu4" style='display: none;'>
				<ul>
					<li id='childmenu41'  menuno="41"><a href="#"  target="mainFrame" onclick="chgcss(this)">文章管理列表</a></li>
					<li id='childmenu42'  menuno="42"><a href="#"  target="mainFrame" onclick="chgcss(this)">文章编辑</a></li>
					<li id='childmenu43'  menuno="43"><a href="#"  target="mainFrame" onclick="chgcss(this)">添加文章</a></li>
				</ul>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		var open = 0;
		var type_init = '<%= menuId%>';
		
		// 切换打开的菜单
		function openchildMenu(type){
			var menuid   = 'newmenu'+open;
			var l_menuid = 'newmenu'+type;
			if(open!=type){
				$('div[id^="newmenu"]').each(function(){
					if($(this).attr('id')==menuid)
						$(this).hide();
					else if($(this).attr('id')==l_menuid){
						$(this).show();
					}
						
				});
				open = type;
			}
		}
	
		function chgcss(obj) {
			$("li>a").each(function() {
				$(this).removeClass("visted");
			});
			$(obj).addClass("visted");
			
			var daohang_str = $(obj).parents('div .MM').parent().find('div[class="anniu-z_02"]').html();
			daohang_str += "-->" + $(obj).html();
			
			$('#position',window.parent.document).html(daohang_str);
		}
		//映射到父窗口
		function navmain(type){
			$('#navmain',window.parent.document).find('#menu_'+type).find('a').click();
		}
		//打开页面时处理
		$(function(){
			openchildMenu(type_init);
		});
	</script>
</html>
